<template>
  <div>
    <el-form class="input-form"
      label-position="right"
      label-width="120px"
      ref="editForm"
      :rules="propRules"
      :disabled="propReadonly"
      :model="form"
    >
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="库存ID" prop="stockId">
          <el-input v-model="form.stockId" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="盘点ID" prop="checkId">
          <el-input v-model="form.checkId" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="原始入库单明细ID" prop="lineId">
          <el-input v-model="form.lineId" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="供应商ID" prop="supplierId">
          <el-input v-model="form.supplierId" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="供应商名称" prop="supplierName">
          <el-input v-model="form.supplierName" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="仓库ID" prop="warehouseId">
          <el-input v-model="form.warehouseId" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="仓库名称" prop="warehouseName">
          <el-input v-model="form.warehouseName" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="货位ID" prop="locationId">
          <el-input v-model="form.locationId" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="货位名称" prop="locationName">
          <el-input v-model="form.locationName" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="物料ID" prop="matrId">
          <el-input v-model="form.matrId" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="物料名称" prop="matrName">
          <el-input v-model="form.matrName" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="物料品规" prop="matrSpec">
          <el-input v-model="form.matrSpec" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="包装单位" prop="packageUnit">
          <el-input v-model="form.packageUnit" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="包装数量" prop="packageQty">
          <el-input v-model="form.packageQty" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="单品价格" prop="skuPrice">
          <el-input v-model="form.skuPrice" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="单品单位" prop="skuUnit">
          <el-input v-model="form.skuUnit" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="单品数量" prop="skuQty">
          <el-input v-model="form.skuQty" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="金额" prop="amount">
          <el-input v-model="form.amount" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="批次" prop="lot">
          <el-input v-model="form.lot" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="效期" prop="expDate">
          <el-date-picker v-model="form.expDate" type="date" :format="dates.defaultDatePattern"  :picker-options="dates.pickerOptions.date" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="生产日期" prop="mfgDate">
          <el-date-picker v-model="form.mfgDate" type="date" :format="dates.defaultDatePattern"  :picker-options="dates.pickerOptions.date" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="" prop="sn">
          <el-input v-model="form.sn" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="" prop="rfid">
          <el-input v-model="form.rfid" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="" prop="udi">
          <el-input v-model="form.udi" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="是否寄售" prop="flagConsignment">
          <el-input v-model="form.flagConsignment" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="是否一物一码" prop="flagOmoc">
          <el-input v-model="form.flagOmoc" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="备注" prop="remark">
          <el-input v-model="form.remark" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="最后修改日期" prop="mdate">
          <el-date-picker v-model="form.mdate" type="date" :format="dates.defaultDatePattern"  :picker-options="dates.pickerOptions.date" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="是否唯一码管理" prop="flagUniqueCode">
          <el-input v-model="form.flagUniqueCode" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="灭菌日期" prop="sterilizationDate">
          <el-date-picker v-model="form.sterilizationDate" type="date" :format="dates.defaultDatePattern"  :picker-options="dates.pickerOptions.date" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="注册证号" prop="certificateNo">
          <el-input v-model="form.certificateNo" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="厂商" prop="mfgName">
          <el-input v-model="form.mfgName" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="入库时间" prop="inTime">
          <el-date-picker v-model="form.inTime" type="date" :format="dates.defaultDatePattern"  :picker-options="dates.pickerOptions.date" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="包ID" prop="packId">
          <el-input v-model="form.packId" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="包内耗材关联包的stock_id" prop="packStockId">
          <el-input v-model="form.packStockId" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="0：非包装耗材;1:跟台包" prop="matrType">
          <el-input v-model="form.matrType" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="灭菌有效期" prop="sterilizationIndate">
          <el-date-picker v-model="form.sterilizationIndate" type="date" :format="dates.defaultDatePattern"  :picker-options="dates.pickerOptions.date" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="盘点状态 0：正常 1：盘盈 2：盘亏" prop="checkStatus">
          <el-input v-model="form.checkStatus" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="" prop="creator">
          <el-input v-model="form.creator" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="" prop="gmtCreate">
          <el-date-picker v-model="form.gmtCreate" type="date" :format="dates.defaultDatePattern"  :picker-options="dates.pickerOptions.date" />
        </el-form-item>
      </el-col>
          </el-row>
                    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="" prop="modifier">
          <el-input v-model="form.modifier" />
        </el-form-item>
      </el-col>
                      <el-col :span="12">
        <el-form-item label="" prop="gmtModified">
          <el-date-picker v-model="form.gmtModified" type="date" :format="dates.defaultDatePattern"  :picker-options="dates.pickerOptions.date" />
        </el-form-item>
      </el-col>
          </el-row>
    </el-form>
  </div>
</template>

<script>

export default {
  data() {
    return {
      form: {},
      viewData: {}
    }
  },
  methods: {  },
  created() {
    this.$emit('event-register', {
      validate: (callback) => {
        this.$refs.editForm.validate(callback)
      },
      beforeSave: () => {
        this.$emit('data-callback', this.form)
        return true
      },
      afterMove: (formData, initData) => {
        this.form = global.utils.jsonClone(formData)

        // 设置switch 元素默认值
      },
      afterSave: () => {  },
      beforeDelete: () => {
        return true
      },
      afterDelete: () => {
      },
      beforeFlow: (flowButtonKey) => {
        return true
      },
      afterFlow: (flowButtonKey) => {
      },
      beforeClose: () => {
        return true
      }
    })
  },
  props: {
    propParent: Object,
    propInitData: Object,
    propPrimaryKey: String,
    propDictionaries: Object,
    propCurrentRow: Object,
    propViewFormData: Object,
    propReadonly: Boolean,
    propStatus: String,
    propRules: Object
  },
  components: {
  },
  computed: {
  }
}
</script>

<style lang="scss" scoped>
  .container {
    width: 100%;
    height: 100%;
  }
</style>
